/*

 * Support: http://www.huqiuhsc.com
 * License: http://www.huqiuhsc.com/license
 */
package com.flycent.hqhs.bean;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 *  商品
 * @author fbl
 *  
 */
public class Product  implements Serializable {

	private static final long serialVersionUID = -2300760218308584140L;

	/** 当前时间 */
	private long nowDate;
	/** 购物车中商品Id  */
	private long productId;
	/**  id */
	private long id;
	/** goods name */
	private String name;
	/**  图片路径  */
	private String image;
	/**  价格  */
	private float price;
	/**  市场价 */
	private float referencePrice;
	/**  购物车中市场价 */
	private float referenceValue;
	/** 折扣 */
	private BigDecimal discount;
	/**  是否置顶  */
	private boolean isTop;
	/** 优惠Id */
	private int promotionId;
	/** 优惠类型 */
	private String preferentialType;
	/** 开始时间 */
	private long startTime;
	/** 结束时间 */
	private long endTime;
	/**  销售额  */
	private int sales;
	/**  单位  */
	private String unit;
	/**  重量  */
	private int weight;
	/**  点击数  */
	private int hits;
	/**  评论数  */
	private int reviewCount;
	/**  喜欢数  */
	private int favoriteCount;
	/**  是否喜欢 */
	private boolean isFavorite;
	/** 商品图片 */
	private List<ProductImage> productImages;
	/** 商品sku  */
	private List<SkuProduct> items;
	/** 商品规格 */
	private List<Specifications> specifications;
	/** 商品规格 */
	private List<SpecificationValues> specificationValues;
	/** 供分享的路径path */
	private String path;
	/** 组合购列表 */
	private List<ProductGroup> productGroups;
	/** 优惠套餐列表  */
	private List<ProductBundle> bundles;
	/** 尺码，颜色 */
	private Map<String, String> values;
	
	public Product(long nowDate, long productId, long id, String name,
			String image, float price, float referencePrice,
			BigDecimal discount, boolean isTop, int promotionId,
			String preferentialType, long startTime, long endTime, int sales,
			String unit, int weight, int hits, int reviewCount,
			int favoriteCount, boolean isFavorite,
			List<ProductImage> productImages, List<SkuProduct> items,
			List<Specifications> specifications,
			List<SpecificationValues> specificationValues, String path,
			List<ProductGroup> productGroups, List<ProductBundle> bundles,
			Map<String, String> values) {
		super();
		this.nowDate = nowDate;
		this.productId = productId;
		this.id = id;
		this.name = name;
		this.image = image;
		this.price = price;
		this.referencePrice = referencePrice;
		this.discount = discount;
		this.isTop = isTop;
		this.promotionId = promotionId;
		this.preferentialType = preferentialType;
		this.startTime = startTime;
		this.endTime = endTime;
		this.sales = sales;
		this.unit = unit;
		this.weight = weight;
		this.hits = hits;
		this.reviewCount = reviewCount;
		this.favoriteCount = favoriteCount;
		this.isFavorite = isFavorite;
		this.productImages = productImages;
		this.items = items;
		this.specifications = specifications;
		this.specificationValues = specificationValues;
		this.path = path;
		this.productGroups = productGroups;
		this.bundles = bundles;
		this.values = values;
	}


	@Override
	public String toString() {
		return "Product [nowDate=" + nowDate + ", id=" + id + ", name=" + name
				+ ", image=" + image + ", price=" + price + ", referencePrice="
				+ referencePrice + ", discount=" + discount + ", isTop="
				+ isTop + ", promotionId=" + promotionId
				+ ", preferentialType=" + preferentialType + ", startTime="
				+ startTime + ", endTime=" + endTime + ", sales=" + sales
				+ ", unit=" + unit + ", weight=" + weight + ", hits=" + hits
				+ ", reviewCount=" + reviewCount + ", favoriteCount="
				+ favoriteCount + ", isFavorite=" + isFavorite
				+ ", productImages=" + productImages + ", items=" + items
				+ ", specifications=" + specifications + ", path=" + path
				+ ", productGroups=" + productGroups + ", bundles=" + bundles
				+ "]";
	}


	public float getReferenceValue() {
		return referenceValue;
	}
	public void setReferenceValue(float referenceValue) {
		this.referenceValue = referenceValue;
	}

	public long getProductId() {
		return productId;
	}
	public void setProductId(long productId) {
		this.productId = productId;
	}
	public Product() {
		super();
	}
	public Map<String, String> getValues() {
		return values;
	}
	public void setValues(Map<String, String> values) {
		this.values = values;
	}
	public List<SpecificationValues> getSpecificationValues() {
		return specificationValues;
	}


	public void setSpecificationValues(List<SpecificationValues> specificationValues) {
		this.specificationValues = specificationValues;
	}


	public List<ProductGroup> getProductGroups() {
		return productGroups;
	}

	public void setProductGroups(List<ProductGroup> productGroups) {
		this.productGroups = productGroups;
	}

	public List<ProductBundle> getBundles() {
		return bundles;
	}

	public void setBundles(List<ProductBundle> bundles) {
		this.bundles = bundles;
	}

	public long getNowDate() {
		return nowDate;
	}

	public void setNowDate(long nowDate) {
		this.nowDate = nowDate;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public float getReferencePrice() {
		return referencePrice;
	}

	public void setReferencePrice(float referencePrice) {
		this.referencePrice = referencePrice;
	}

	public BigDecimal getDiscount() {
		return discount;
	}

	public void setDiscount(BigDecimal discount) {
		this.discount = discount;
	}

	public boolean isTop() {
		return isTop;
	}

	public void setTop(boolean isTop) {
		this.isTop = isTop;
	}

	public int getPromotionId() {
		return promotionId;
	}

	public void setPromotionId(int promotionId) {
		this.promotionId = promotionId;
	}

	public String getPreferentialType() {
		return preferentialType;
	}

	public void setPreferentialType(String preferentialType) {
		this.preferentialType = preferentialType;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getEndTime() {
		return endTime;
	}

	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}

	public int getSales() {
		return sales;
	}

	public void setSales(int sales) {
		this.sales = sales;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	public int getHits() {
		return hits;
	}

	public void setHits(int hits) {
		this.hits = hits;
	}

	public int getReviewCount() {
		return reviewCount;
	}

	public void setReviewCount(int reviewCount) {
		this.reviewCount = reviewCount;
	}

	public int getFavoriteCount() {
		return favoriteCount;
	}

	public void setFavoriteCount(int favoriteCount) {
		this.favoriteCount = favoriteCount;
	}

	public boolean isFavorite() {
		return isFavorite;
	}

	public void setFavorite(boolean isFavorite) {
		this.isFavorite = isFavorite;
	}

	public List<ProductImage> getProductImages() {
		return productImages;
	}

	public void setProductImages(List<ProductImage> productImages) {
		this.productImages = productImages;
	}

	public List<SkuProduct> getItems() {
		return items;
	}

	public void setItems(List<SkuProduct> items) {
		this.items = items;
	}

	public List<Specifications> getSpecifications() {
		return specifications;
	}

	public void setSpecifications(List<Specifications> specifications) {
		this.specifications = specifications;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	/**
	 * @author fbl
	 *  商品规格
	 */
	public static class Specifications{
		/** 产品ID */
		private long id;
		/** 分类值 */
		private String name;
		/** 类型 */
		private String type;
		/** 通知 */
		private String memo;
		/** 选择的那个  */
		private int check = 0;
		/** 规格值的数组 */
		private List<SpecificationValues> specificationValues;

		public int getCheck() {
			return check;
		}
		public void setCheck(int check) {
			this.check = check;
		}
		public long getId() {
			return id;
		}
		public void setId(long id) {
			this.id = id;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public String getMemo() {
			return memo;
		}
		public void setMemo(String memo) {
			this.memo = memo;
		}
		public List<SpecificationValues> getSpecificationValues() {
			return specificationValues;
		}
		public void setSpecificationValues(List<SpecificationValues> specificationValues) {
			this.specificationValues = specificationValues;
		}

	}

	/**
	 * @author fbl
	 *  product sku 
	 */
	public static class SkuProduct implements Serializable{

		private static final long serialVersionUID = 4261999710349227064L;
		/** sku id  */
		private long id;
		/** goodId*/
		private long productId;
		/** sku  name*/
		private String name;
		/** 重量 */
		private int weight;
		/** 图片路径 */
		private String image;
		/** 价格 */
		private float price;
		/**  市场价*/		
		private float marketPrice;
		/**  为了在订单页面显示商品数量  */
		private int quantity;

		public String getImage() {
			return image;
		}
		public void setImage(String image) {
			this.image = image;
		}
		public long getProductId() {
			return productId;
		}
		public void setProductId(long productId) {
			this.productId = productId;
		}
		public int getQuantity() {
			return quantity;
		}
		public void setQuantity(int quantity) {
			this.quantity = quantity;
		}

		private List<SpecificationValues> specificationValues;

		public List<SpecificationValues> getSpecificationValues() {
			return specificationValues;
		}

		public void setSpecificationValues(List<SpecificationValues> specificationValues) {
			this.specificationValues = specificationValues;
		}

		public long getId() {
			return id;
		}

		public void setId(long id) {
			this.id = id;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public int getWeight() {
			return weight;
		}

		public void setWeight(int weight) {
			this.weight = weight;
		}

		public float getPrice() {
			return price;
		}

		public void setPrice(float price) {
			this.price = price;
		}

		public float getMarketPrice() {
			return marketPrice;
		}

		public void setMarketPrice(float marketPrice) {
			this.marketPrice = marketPrice;
		}


	}

	/**
	 * 商品规格
	 * @author 
	 *
	 */
	public static class SpecificationValues{
		/**  */
		private long id;
		/**  */
		private String name;

		private boolean isCheck;
		
		
		public boolean isCheck() {
			return isCheck;
		}
		public void setCheck(boolean isCheck) {
			this.isCheck = isCheck;
		}
		public long getId() {
			return id;
		}
		public void setId(long id) {
			this.id = id;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
	}
}